<template>
    <div class="box">
        <header class="header">
            <van-search v-model="value" placeholder="请输入搜索关键词" @click-input="$router.push('/search')" />
        </header>
        <div class="content">
            <!-- <van-swipe :autoplay="3000">
                <van-swipe-item v-for="item in images" :key="item">
                    <img :src="item" class="swiper-img" />
                </van-swipe-item>
            </van-swipe> -->
            <!-- 传值： 只要是变量、布尔类型、数值类型 必须解析，就是v-bind绑定 -->
            <Swiper :imagesArr="images" />
            <van-grid>
                <van-grid-item
                    icon="https://m15.360buyimg.com/mobilecms/jfs/t1/187640/12/30456/5256/639c2315Ebc95c142/350a8f0c766f5460.png"
                    text="超市" />
                <van-grid-item icon="photo-o" text="文字" />
                <van-grid-item icon="photo-o" text="文字" />
                <van-grid-item icon="photo-o" text="文字" />
            </van-grid>

            <Prolist />
        </div>
    </div>
</template>

<script>
import Prolist from './components/prolist.vue'
import Swiper from './components/Swiper.vue'
export default {
    components: {
        Prolist,
        Swiper
    },
    data() {
        return {
            images: [
                'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
                'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
                'https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg',
                'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg'
            ]
        }
    }

}
</script>

<style lang="scss" scoped>
// .my-swipe .van-swipe-item {
//     color: #fff;
//     font-size: 20px;
//     line-height: 150px;
//     text-align: center;
//     background-color: #39a9ed;
// }
// .swiper-img {
//     width: 100%;
//     height: 2rem;
// }</style>
